<template>
	<view class="content">
		<view>
			<view class="pay-img">
				<image style="width: 100%; height: 100%;" :src="payImg()"></image>
			</view>
			<view class="pay-title"> {{ title }} </view>
			<view class="pay-mess"> {{ mess }} </view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				status: 1,
				img: {
					success: "/static/images/icons/pic_success@3x.png",
					error: "/static/images/icons/pic_error@3x.png"
				},
				title: "支付成功",
				mess: "期待您的下次光临"
			}
		},
		created() {
			let statu = this.getUrlKey('status')
			this.status = parseInt(statu)
			if (parseInt(statu) === 2) {
				this.title = "支付失败";
				this.mess = "请联系客服"
			}
		},
		methods: {
			payImg() {
				if (this.status === 1) {
					return this.img.success
				} else {
					return this.img.error
				}
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		justify-content: center;
	}

	.pay-img {
		margin-top: 240rpx;
		width: 440rpx;
		height: 272rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.pay-title {
		margin-top: 40rpx;
		text-align: center;
		font-size: 48rpx;
		font-family: PingFang SC;
		font-weight: 800;
		color: rgba(51, 51, 51, 1);
		line-height: 1;
	}

	.pay-mess {
		margin-top: 12rpx;
		text-align: center;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: rgba(209, 213, 224, 1);
	}
</style>
